# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: 拖动操作.py
@time: 2021/8/22 11:10
'''
from selenium import webdriver
from selenium.webdriver import ActionChains

options = webdriver.ChromeOptions()

user_ag='MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; '+ 'CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.2'
options.add_argument('user-agent=%s'%user_ag)
# 设置屏蔽
options.add_argument('--disable-blink-features=AutomationControlled')
#隐藏"Chrome正在受到自动软件的控制"
options.add_argument('disable-infobars')
browser = webdriver.Chrome(chrome_options=options)
#将浏览器最大化显示
browser.maximize_window()

browser.get('https://bot.sannysoft.com/')

# url = 'http://www.runoob.com/try/try.php?filename=jqueryui-api-droppable'
# browser.get(url)
# browser.switch_to.frame('iframeResult')
# source = browser.find_element_by_css_selector('#draggable')
# target = browser.find_element_by_css_selector('#droppable')
# actions = ActionChains(browser)
# actions.drag_and_drop(source, target)
# actions.perform()
